1. Field of the Invention
This invention is related to the field of integrated circuits that include processors, and more particularly to generating program counter (PC) traces in such integrated circuits.
2. Description of the Related Art
Electronic systems of various types include processors, also referred to as central processing units (CPUs). A processor can include multiple integrated circuit “chips”. The so-called microprocessor is typically a processor on a single chip, with no other “non-processor” functionality. More recently, processors have been integrated with other functionality in devices commonly referred to as integrated processors, embedded processors, and system on a chip (SOC) devices.
The processors execute programs, and can interact with other devices in the system under control of the program being executed. The program comprises one or more instruction sequences, which can include branches within the sequences, branches to other sequences, etc. Each instruction is identified by an address, or PC, which locates the instruction in memory (indirectly, when address translation is enabled).
During development of the system and programs to execute on the system, various debugging aids can be useful. For example, the stream of PCs executed by the processor may be useful to determine the program flow. Both functional problem diagnoses (traditional debugging) and performance problem diagnoses (e.g. determining why performance is lower than desired or expected) can benefit from having the stream of PCs executed by the processor.
As frequency of operation increases, the number of PCs that need to be tracked in a unit of real time (e.g. a second) increases. Additionally, as the complexity of the processor and/or the integrated circuit including the processor increases (superscalar design, multiple cores per chip, etc.), the number of PCs per clock cycle increases. Accordingly, the number of PCs that need to be captured in real time expands dramatically.